#### INSTALL AND LOAD PACKAGES ==========================================================

# install pacman package if not installed -----------------------------------------------
suppressWarnings(if (!require("pacman")) install.packages("pacman"))

# load packages and install if not installed --------------------------------------------
pacman::p_load(magrittr, dplyr, ggplot2, ggtext, scales, rstanarm,
               rstan, parallel, broom.mixed, sjPlot, effects, ggeffects,
               labelled, sjlabelled, gridExtra, stringr, modelsummary,
               install = TRUE,
               update = FALSE)

options(modelsummary_get="broom")

# show loaded packages ------------------------------------------------------------------
cat("loaded packages\n")
print(pacman::p_loaded())
